package com.dxy.df.config.db;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Created by cxf_dxy on 2018/7/13.
 */
@Setter
@Getter
@ConfigurationProperties(prefix ="datasource.druid")
public class DatasourceProperties {

    private String dbUrl;

    private String username;

    private String password;

    private int initialSize = 5;
    private int minIdle = 5;
    private int maxActive = 100;
    private long maxWait = 10_000l;
    private long timeBetweenEvictionRunsMillis = 60_000l;
    private long minEvictableIdleTimeMillis = 30_000;
    private boolean testWhileIdle = Boolean.TRUE;
    private boolean testOnBorrow = Boolean.FALSE;
    private boolean testOnReturn = Boolean.FALSE;
    private boolean poolPreparedStatements = Boolean.TRUE;
    private int maxPoolPreparedStatementPerConnectionSize = 50;
    private int queryTimeout = 3_000;
    private int transactionQueryTimeout = 4_000;



}
